<?php include_stylesheets_for_form($form) ?>
<?php include_javascripts_for_form($form) ?>

<div class="sf_admin_form">
  <?php echo form_tag_for($form, '@apartman') ?>
    <?php echo $form->renderHiddenFields() ?>

    <?php if ($form->hasGlobalErrors()): ?>
      <?php echo $form->renderGlobalErrors() ?>
    <?php endif; ?>

<table>
  <tr>
    <td>
      <?php echo $form['name']->renderLabel() ?>      
    </td>
    <td colspan="3">
      <?php echo $form['name']->renderError() ?>
      <?php echo $form['name']->render() ?>
    </td>
  </tr>
  
  <tr>
    <td>
      <?php echo $form['short_details']->renderLabel() ?>      
    </td>
    <td colspan="3">
      <?php echo $form['short_details']->renderError() ?>
      <?php echo $form['short_details']->render() ?>
    </td>
  </tr>

  <tr>
    <td>
      <label><?php echo __('address_info') ?></label>
    </td>
    <td>
      <table>
	<tr>
	  <td>
	    <?php echo $form['city']->renderLabel() ?>      
	  </td>
	  <td>
	    <?php echo $form['city']->renderError() ?>
	    <?php echo $form['city']->render() ?>
	  </td> 
	</tr>
      
	<tr>
	  <td>
	    <?php echo $form['zip']->renderLabel() ?>      
	  </td>
	  <td>
	    <?php echo $form['zip']->renderError() ?>
	    <?php echo $form['zip']->render() ?>
	  </td>
	</tr>
	
	<tr>
	  <td>
	    <?php echo $form['address']->renderLabel() ?>      
	  </td>
	  <td>
	    <?php echo $form['address']->renderError() ?>
	    <?php echo $form['address']->render() ?>
	  </td>   
	</tr>
      </table>
    </td>
    <td>
      <label><?php echo __('apartman_info') ?></label>
    </td>
    <td>
      <table>
	<tr>
	  <td>
	    <?php echo $form['square_meters']->renderLabel() ?>      
	  </td>
	  <td>
	    <?php echo $form['square_meters']->renderError() ?>
	    <?php echo $form['square_meters']->render() ?>
	  </td>
	</tr>
	<tr>	  
	  <td>
	    <?php echo $form['max_occupancy']->renderLabel() ?>      
	  </td>
	  <td>
	    <?php echo $form['max_occupancy']->renderError() ?>
	    <?php echo $form['max_occupancy']->render() ?>
	  </td>
	</tr>
	<tr>	  
	  <td>
	    <?php echo $form['bedrooms']->renderLabel() ?>      
	  </td>
	  <td>
	    <?php echo $form['bedrooms']->renderError() ?>
	    <?php echo $form['bedrooms']->render() ?>
	  </td>
	</tr>
	<tr>	  
	  <td>
	    <?php echo $form['bathrooms']->renderLabel() ?>      
	  </td>
	  <td>
	    <?php echo $form['bathrooms']->renderError() ?>
	    <?php echo $form['bathrooms']->render() ?>
	  </td>
	</tr>	
      </table>
    </td>    
  </tr> 
  
  <tr>
    <td>
      <?php echo $form['check_in_options']->renderLabel() ?>      
    </td>
    <td>
      <?php echo $form['check_in_options']->renderError() ?>
      <?php echo $form['check_in_options']->render() ?>
    </td>
    
    <td>
      <?php echo $form['check_out_options']->renderLabel() ?>      
    </td>
    <td>
      <?php echo $form['check_out_options']->renderError() ?>
      <?php echo $form['check_out_options']->render() ?>
    </td>    
  </tr>  
  
  <tr>
    <td>
      <?php echo $form['prices']->renderLabel() ?>
      <?php $forms = $form->getEmbeddedForms();
	$forms['prices']->renderHiddenFields();
      ?>
    </td>
    <td colspan="3">
      <?php echo $form['prices']->renderError() ?>
      <?php echo $form['prices']->render() ?>
    </td>
  </tr>  
  
  <tr>
    <td>
      <?php echo $form['full_description']->renderLabel() ?>      
    </td>
    <td colspan="3">
      <?php echo $form['full_description']->renderError() ?>
      <?php echo $form['full_description']->render() ?>
    </td>
  </tr>  

  <tr>
    <td>
      <?php echo $form['location']->renderLabel() ?>      
    </td>
    <td colspan="3">
      <?php echo $form['location']->renderError() ?>
      <?php echo $form['location']->render() ?>
    </td>
  </tr>  

  <tr>
    <td>
      <?php echo $form['map']->renderLabel() ?>      
    </td>
    <td colspan="3">
      <?php echo $form['map']->renderError() ?>
      <?php echo $form['map']->render() ?>
    </td>
  </tr>  
  
  <tr>
    <td>
      <?php echo $form['gallery']->renderLabel() ?>
      <?php $forms = $form->getEmbeddedForms();
	$forms['gallery']->renderHiddenFields();
      ?>
    </td>
    <td colspan="3">
      <?php echo $form['gallery']->renderError() ?>
      <?php echo $form['gallery']->render() ?>
    </td>
  </tr>

</table>


    <?php include_partial('apartman/form_actions', array('apartman' => $apartman, 'form' => $form, 'configuration' => $configuration, 'helper' => $helper)) ?>
  </form>
</div>